package com.dek.seckill.controller;

import com.dek.seckill.common.handler.AccessLimit;
import com.dek.seckill.common.util.Result;
import org.springframework.beans.factory.annotation.Autowired;

public class SeckillController {

    @Autowired
    private OrderInfoService orderInfoService;


    @AccessLimit(seconds = 5, maxCount = 5, login = true)
    public Result seckill(String goodsId) {
        String user = "1";
        orderInfoService.seckill(goodsId, user);

        return Result.success();
    }

}
